package com.zhy.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhy.model.system.SysRole;
import com.zhy.model.vo.AssignRoleVo;
import com.zhy.model.vo.SysRoleQueryVo;

import java.util.Map;

/**
 * @author 随缘而愈
 * @version 1.0
 * @description 系统角色服务接口
 * @date 8/3/2024 下午7:20
 */

public interface SysRoleService extends IService<SysRole> {

    IPage<SysRole> selectPage(Page<SysRole> pageParam, SysRoleQueryVo roleQueryVo);

    /**
     * 根据用户获取角色数据
     * @param userId
     * @return
     */
    Map<String, Object> getRolesByUserId(Long userId);

    /**
     * 分配角色
     * @param assignRoleVo
     */
    void doAssign(AssignRoleVo assignRoleVo);

}
